<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">

        var fun = function () {
            alert("无参函数")
        }

        // fun();
        var fun2 = function (a,b) {
            alert("有参函数func2（）被调用了 a => " +a +" ,b =>" +b);

        }
        fun2(1,2);

        // 定义带有返回值的函数
        var fun3 = function (num1,num2) {
            var result = num1 + num2;
            return result;

        }
        alert(fun3(100,222));


    </script>

</head>
<body>

</body>
</html>